<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
      layout:decorate="~{admin/common/common}">
<head>
    <title>内容列表</title>
</head>

<body class="pos-r" layout:fragment="content">
<div class="pos-a" style="width:200px;left:0;top:0; bottom:0; height:100%; border-right:1px solid #e5e5e5; background-color:#f5f5f5; overflow:auto;">
    <ul id="treeDemo" class="ztree"></ul>
</div>
<div style="margin-left:200px;">
    <nav class="breadcrumb">
        <i class="Hui-iconfont">&#xe67f;</i> 首页
        <span class="c-gray en">&gt;</span> 内容管理
        <span class="c-gray en">&gt;</span> 内容列表
        <span class="c-gray en" th:if="${contentCat != null}">&gt;</span><th:block th:text="${contentCat?.name}">1</th:block>
        <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
            <i class="Hui-iconfont">&#xe68f;</i>
        </a>
    </nav>
    <form id="myForm" th:action="@{/admin/content}" th:method="get">
    <div class="page-container">
        <div class="text-c">
            日期范围：
            <input type="text" onfocus="WdatePicker({maxDate:'#F{$dp.$D(\'datemax\')||\'%y-%M-%d\'}'})" id="datemin" class="input-text Wdate" style="width:120px;" name="startTime" th:value="${startTime}" readonly="readonly"/>
            -
            <input type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'datemin\')}',maxDate:'%y-%M-%d'})" id="datemax" class="input-text Wdate" style="width:120px;" name="endTime" th:value="${endTime}" readonly="readonly"/>
            <input type="text" class="input-text" style="width:250px" placeholder="输入管理员名称" name="username" th:value="${username}"/>
            <button type="submit" class="btn btn-success">
                <i class="Hui-iconfont">&#xe665;</i>
                搜索
            </button>
        </div>
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                <a class="btn btn-primary radius" th:onclick="'javascript:content_add(\'添加内容\',\'/admin/content/add?catId='+${contentCat?.id}+'\','+${contentCat?.id}+');'" href="javascript:;">
                    <i class="Hui-iconfont">&#xe600;</i>
                    添加内容
                </a>
            </span>
            <span class="r">共有数据：<strong th:text="${pageInfo?.total}">54</strong> 条</span>
        </div>
        <div class="mt-20">
            <table class="table table-border table-bordered table-bg table-hover table-sort">
                <thead>
                <tr class="text-c">
                    <th width="60">缩略图</th>
                    <th width="100">标题</th>
                    <th>标题描述</th>
                    <th width="80">创建时间</th>
                    <th width="80">操作</th>
                </tr>
                </thead>
                <tbody>
                <tr class="text-c va-m" th:each="model:${pageInfo?.list}" th:object="${model}">
                    <td>
                        <a onClick="product_show('哥本哈根橡木地板','product-show.html','10001')" href="javascript:;">
                            <img width="60" class="product-thumb" src="temp/product/Thumb/6204.jpg" th:src="*{img}">
                        </a>
                    </td>
                    <td class="text-l" th:text="*{title}"></td>
                    <td class="text-l" th:text="*{titleDesc}">原木的外在,实木条形结构,色泽花纹自然,写意;款式设计吸取实木地板的天然去雕饰之美,在视觉上给人带来深邃联想.多款产品适合搭配不同的风格的室内装饰;功能流露出尊贵典雅的大气韵味。</td>
                    <td class="text-l" th:text="*{#dates.format(createTime,'yyyy-MM-dd')}"></td>
                    <td class="td-manage">
                        <a style="text-decoration:none" class="ml-5" onClick="content_edit('产品编辑','product-add.html','10001')" th:onclick="'javascript:content_edit(\'编辑内容\',\'/admin/content/edit?id='+*{id}+'\');'" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a>
                        <a style="text-decoration:none" class="ml-5" onClick="content_del(this,'10001')" th:onclick="'javascript:content_del(this, \'/admin/content/'+*{id}+'\');'" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a>
                    </td>
                </tr>
                </tbody>
            </table>
            <div th:replace="admin/common/page :: page"></div>
        </div>
    </div>
    </form>
</div>

<link rel="stylesheet" type="text/css" th:href="@{/h-ui/lib/zTree/v3/css/metroStyle/metroStyle.css}" />
<script type="text/javascript" th:src="@{/h-ui/lib/zTree/v3/js/jquery.ztree.core-3.5.min.js}"></script>
<script type="text/javascript" th:src="@{/h-ui/lib/zTree/v3/js/jquery.ztree.excheck-3.5.min.js}"></script>
<script type="text/javascript" th:src="@{/js/admin/content/content-list.js}"></script>
<script th:inline="javascript">
    $(document).ready(function(){
        inintTree();
    });
</script>
</body>
</html>